package com.topscomm.mis.cbb.pm.api;

import com.topscomm.mis.cbb.pm.dto.DeliverableDeleteDto;
import com.topscomm.mis.cbb.pm.dto.DeliverableDto;
import com.topscomm.pub.vo.Page;
import com.topscomm.tap.common.SessionUserBean;
import java.util.List;
import java.util.Map;
import javax.validation.Valid;
import javax.validation.constraints.Size;
import org.springframework.validation.annotation.Validated;

public interface IDeliverableService {

    /**
     * description 插入数据
     *
     * @param paramMap
     * @return java.util.Map<java.lang.String, java.lang.Object>
     * @author wxm
     * @date 2023-06-25 18:12:13
     * @modify
     */
    Map<String, Object> insert(Map<String, Object> paramMap);

    /**
     * description 列表页面
     *
     * @param paraMap
     * @param sqlWhere
     * @return com.topscomm.pub.vo.Page
     * @author wxm
     * @date 2023-06-25 18:14:51
     * @modify
     */
    Page list(Map<String, Object> paraMap, String sqlWhere);

    /**
     * description 更新
     *
     * @param paramMap
     * @return void
     * @author wxm
     * @date 2023-06-25 18:19:20
     * @modify
     */
    void update(Map<String, Object> paramMap);

    /**
     * description 创建交付物
     *
     * @param deliverableDto
     * @return com.topscomm.mis.cbb.pm.base.pojo.CbbPmDeliverableEntity
     * @author wxm
     * @date 2023-06-24 18:51:06
     * @modify
     */
    void createDeliverable(@Validated DeliverableDto deliverableDto);

    /**
     * description 删除交付物
     *
     * @param sourceType
     * @param sourceId
     * @return int
     * @author wxm
     * @date 2023-06-25 18:15:04
     * @modify
     */
    int deleteDeliverable(String sourceType, long sourceId);


    /**
     * description 批量创建交付物
     *
     * @param deliverableDtoList
     * @return void
     * @author wxm
     * @date 2023-06-30 16:08:11
     * @modify
     */
    void createDeliverableBatch(
        @Size(min = 1, message = "交付物不能为空") List<@Valid DeliverableDto> deliverableDtoList);


    /**
     * description 批量删除交付物
     *
     * @param deliverableDeleteDtoList
     * @return int
     * @author wxm
     * @date 2023-06-30 16:11:31
     * @modify
     */
    int deleteDeliverableBatch(
        @Size(min = 1, message = "数据不能为空") List<@Valid DeliverableDeleteDto> deliverableDeleteDtoList);

    /**
     * description 删除
     *
     * @param paraMap
     * @return void
     * @author wxm
     * @date 2023-06-25 18:19:54
     * @modify
     */
    void delete(Map<String, Object> paraMap);

    /**
     * description 加载详情页
     *
     * @param paraMap
     * @return java.util.Map<java.lang.String, java.lang.Object>
     * @author wxm
     * @date 2023-06-25 18:44:58
     * @modify
     */
    Map<String, Object> load(Map<String, Object> paraMap);

    /**
     * description 根据项目号查询项目经理工号
     *
     * @param projectCode 项目号
     * @return java.lang.String
     * @author wxm
     * @date 2023-06-25 19:05:32
     * @modify
     */
    String queryProjectByCode(String projectCode);

    /**
     * description 获取数据权限
     *
     * @param select
     * @param tableName
     * @param userBean
     * @return java.lang.String
     * @author wxm
     * @date 2023-06-25 19:50:01
     * @modify
     */
    String getDataPermission(int select, String tableName, SessionUserBean userBean);
}